/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;

  router.get('/wechat', controller.wechat.index);
  router.post('/wechat', middleware.wechatHandle);
  router.get('/wechat/getAccessToken', controller.wechat.getAccessToken);
  router.post('/wechat/sendTemplateMessage', controller.wechat.sendTemplateMessage);
};
